#[macro_use]
extern crate diesel_migrations;

mod sqlite;

embed_migrations!();

pub fn migrate(sql_file_path:&str) {
  let pool = sqlite::establish_connection_pool(sql_file_path);
  let connection = pool.get().unwrap();
  //
  //      This will run the necessary migrations.
  //let _ = embedded_migrations::run(&connection);
  //
  //      By default the output is thrown out. If you want to redirect it to stdout, you
  //     should call embedded_migrations::run_with_output.
  let _ = embedded_migrations::run_with_output(&connection, &mut std::io::stdout());
}
